package com.burpee.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.burpee.dao.BoardDao;
import com.burpee.ui.Board;

@Service(value="boardService")
public class BoardServiceImpl implements BoardService {
	
	@Autowired
	BoardDao boardDao;

	public List<Board> list() {
		
		return boardDao.list();
	}

	public Board view(long boardNo) {
		
		return boardDao.view(boardNo);
	}

	public boolean add(Board board) {
		if(boardDao.add(board) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public boolean modify(Board board) {
		if(boardDao.modify(board) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public boolean remove(long boardNo) {
		if(boardDao.remove(boardNo) > 0){
			return true;
		}
		else{

			return false;
		}
	}

}
